package com.dhcc.model;

import javax.persistence.*;

/**
 * Created by guorui on 2017/3/17.
 */
@Entity
@Table(name = "tb_tk", schema = "test", catalog = "")
public class Tk {
    private int tmId;
    private String tmType;
    private int tmInnId;

    @Id
    @Column(name = "tm_id", nullable = false)
    public int getTmId() {
        return tmId;
    }

    public void setTmId(int tmId) {
        this.tmId = tmId;
    }

    @Basic
    @Column(name = "tm_type", nullable = false, length = 10)
    public String getTmType() {
        return tmType;
    }

    public void setTmType(String tmType) {
        this.tmType = tmType;
    }

    @Basic
    @Column(name = "tm_inn_id", nullable = false)
    public int getTmInnId() {
        return tmInnId;
    }

    public void setTmInnId(int tmInnId) {
        this.tmInnId = tmInnId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Tk tk = (Tk) o;

        if (tmId != tk.tmId) return false;
        if (tmInnId != tk.tmInnId) return false;
        if (tmType != null ? !tmType.equals(tk.tmType) : tk.tmType != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = tmId;
        result = 31 * result + (tmType != null ? tmType.hashCode() : 0);
        result = 31 * result + tmInnId;
        return result;
    }
}
